import 'package:hotpot/generated/json/base/json_field.dart';
import 'package:hotpot/generated/json/sale_order.g.dart';
import 'dart:convert';

@JsonSerializable()
class SaleOrder {

	int? id;
	// @JSONField(name: "campaign_id")
	// bool? campaignId;
	// @JSONField(name: "source_id")
	// bool? sourceId;
	// @JSONField(name: "medium_id")
	// bool? mediumId;
	// @JSONField(name: "activity_ids")
	// List<dynamic>? activityIds;
	// @JSONField(name: "activity_state")
	// bool? activityState;
	// @JSONField(name: "activity_user_id")
	// bool? activityUserId;
	// @JSONField(name: "activity_type_id")
	// bool? activityTypeId;
	// @JSONField(name: "activity_type_icon")
	// bool? activityTypeIcon;
	// @JSONField(name: "activity_date_deadline")
	// bool? activityDateDeadline;
	// @JSONField(name: "my_activity_date_deadline")
	// bool? myActivityDateDeadline;
	// @JSONField(name: "activity_summary")
	// bool? activitySummary;
	// @JSONField(name: "activity_exception_decoration")
	// bool? activityExceptionDecoration;
	// @JSONField(name: "activity_exception_icon")
	// bool? activityExceptionIcon;
	// @JSONField(name: "message_is_follower")
	// bool? messageIsFollower;
	// @JSONField(name: "message_follower_ids")
	// List<int>? messageFollowerIds;
	// @JSONField(name: "message_partner_ids")
	// List<int>? messagePartnerIds;
	// @JSONField(name: "message_ids")
	// List<int>? messageIds;
	// @JSONField(name: "has_message")
	// bool? hasMessage;
	// @JSONField(name: "message_needaction")
	// bool? messageNeedaction;
	// @JSONField(name: "message_needaction_counter")
	// int? messageNeedactionCounter;
	// @JSONField(name: "message_has_error")
	// bool? messageHasError;
	// @JSONField(name: "message_has_error_counter")
	// int? messageHasErrorCounter;
	// @JSONField(name: "message_attachment_count")
	// int? messageAttachmentCount;
	// @JSONField(name: "message_main_attachment_id")
	// bool? messageMainAttachmentId;
	// @JSONField(name: "website_message_ids")
	// List<int>? websiteMessageIds;
	// @JSONField(name: "message_has_sms_error")
	// bool? messageHasSmsError;
	// @JSONField(name: "access_url")
	// String? accessUrl;
	// @JSONField(name: "access_token")
	// String? accessToken;
	// @JSONField(name: "access_warning")
	// String? accessWarning;
	String? name;
	// @JSONField(name: "company_id")
	// List<int>? companyId;
	// @JSONField(name: "partner_id")
	// List<int>? partnerId;
	String? state;
	// @JSONField(name: "client_order_ref")
	// bool? clientOrderRef;
	@JSONField(name: "create_date")
	String? createDate;
	// @JSONField(name: "commitment_date")
	// bool? commitmentDate;
	// @JSONField(name: "date_order")
	// String? dateOrder;
	// bool? origin;
	// bool? reference;
	// @JSONField(name: "require_signature")
	// bool? requireSignature;
	// @JSONField(name: "require_payment")
	// bool? requirePayment;
	String? signature;
	// @JSONField(name: "signed_by")
	// bool? signedBy;
	// @JSONField(name: "signed_on")
	// bool? signedOn;
	// @JSONField(name: "validity_date")
	// bool? validityDate;
	// String? note;
	@JSONField(name: "partner_invoice_id")
	List<String>? partnerInvoiceId;
	@JSONField(name: "partner_shipping_id")
	List<String>? partnerShippingId;
	// @JSONField(name: "fiscal_position_id")
	// bool? fiscalPositionId;
	// @JSONField(name: "payment_term_id")
	// bool? paymentTermId;
	// @JSONField(name: "pricelist_id")
	// List<int>? pricelistId;
	// @JSONField(name: "currency_id")
	// List<int>? currencyId;
	// @JSONField(name: "currency_rate")
	// double? currencyRate;
	// @JSONField(name: "user_id")
	// List<int>? userId;
	// @JSONField(name: "team_id")
	// List<int>? teamId;
	// @JSONField(name: "order_line")
	// List<int>? orderLine;
	@JSONField(name: "amount_untaxed")
	double? amountUntaxed;
	@JSONField(name: "amount_tax")
	double? amountTax;
	@JSONField(name: "amount_total")
	double? amountTotal;
	// @JSONField(name: "invoice_count")
	// int? invoiceCount;
	// @JSONField(name: "invoice_ids")
	// List<dynamic>? invoiceIds;
	@JSONField(name: "invoice_status")
	String? invoiceStatus;
	// @JSONField(name: "transaction_ids")
	// List<dynamic>? transactionIds;
	// @JSONField(name: "authorized_transaction_ids")
	// List<dynamic>? authorizedTransactionIds;
	// @JSONField(name: "analytic_account_id")
	// bool? analyticAccountId;
	// @JSONField(name: "tag_ids")
	// List<dynamic>? tagIds;
	// @JSONField(name: "amount_undiscounted")
	// double? amountUndiscounted;
	// @JSONField(name: "country_code")
	// String? countryCode;
	// @JSONField(name: "expected_date")
	// bool? expectedDate;
	// @JSONField(name: "is_expired")
	// bool? isExpired;
	// @JSONField(name: "partner_credit_warning")
	// String? partnerCreditWarning;
	// @JSONField(name: "tax_country_id")
	// List<int>? taxCountryId;
	// @JSONField(name: "tax_totals")
	// SaleOrderTaxTotals? taxTotals;
	// @JSONField(name: "terms_type")
	// String? termsType;
	// @JSONField(name: "type_name")
	// String? typeName;
	// @JSONField(name: "show_update_fpos")
	// bool? showUpdateFpos;
	// @JSONField(name: "show_update_pricelist")
	// bool? showUpdatePricelist;
	// @JSONField(name: "__last_update")
	// String? sLastUpdate;
	// @JSONField(name: "display_name")
	// String? displayName;
	// @JSONField(name: "create_uid")
	// List<int>? createUid;
	// @JSONField(name: "write_uid")
	// List<int>? writeUid;
	// @JSONField(name: "write_date")
	// String? writeDate;
	// @JSONField(name: "applied_coupon_ids")
	// List<dynamic>? appliedCouponIds;
	// @JSONField(name: "code_enabled_rule_ids")
	// List<dynamic>? codeEnabledRuleIds;
	// @JSONField(name: "coupon_point_ids")
	// List<dynamic>? couponPointIds;
	// @JSONField(name: "reward_amount")
	// double? rewardAmount;
	// @JSONField(name: "sale_order_template_id")
	// bool? saleOrderTemplateId;
	// @JSONField(name: "sale_order_option_ids")
	// List<dynamic>? saleOrderOptionIds;
	// bool? incoterm;
	// @JSONField(name: "incoterm_location")
	// bool? incotermLocation;
	// @JSONField(name: "picking_policy")
	// String? pickingPolicy;
	// @JSONField(name: "warehouse_id")
	// List<int>? warehouseId;
	// @JSONField(name: "picking_ids")
	// List<int>? pickingIds;
	// @JSONField(name: "delivery_count")
	// int? deliveryCount;
	@JSONField(name: "delivery_status")
	String? deliveryStatus;
	// @JSONField(name: "procurement_group_id")
	// List<int>? procurementGroupId;
	// @JSONField(name: "effective_date")
	// bool? effectiveDate;
	// @JSONField(name: "json_popover")
	// String? jsonPopover;
	// @JSONField(name: "show_json_popover")
	// bool? showJsonPopover;
	// @JSONField(name: "website_order_line")
	// List<int>? websiteOrderLine;
	// @JSONField(name: "cart_quantity")
	// int? cartQuantity;
	// @JSONField(name: "only_services")
	// bool? onlyServices;
	// @JSONField(name: "is_abandoned_cart")
	// bool? isAbandonedCart;
	// @JSONField(name: "cart_recovery_email_sent")
	// bool? cartRecoveryEmailSent;
	// @JSONField(name: "website_id")
	// bool? websiteId;
	// @JSONField(name: "shop_warning")
	// bool? shopWarning;
	// @JSONField(name: "pos_order_line_ids")
	// List<int>? posOrderLineIds;
	// @JSONField(name: "pos_order_count")
	// int? posOrderCount;
	// @JSONField(name: "amount_unpaid")
	// double? amountUnpaid;
	// @JSONField(name: "disabled_auto_rewards")
	// List<dynamic>? disabledAutoRewards;
	// @JSONField(name: "is_pos_unpaid")
	// bool? isPosUnpaid;
	// @JSONField(name: "purchase_order_count")
	// int? purchaseOrderCount;
  
  SaleOrder();

  factory SaleOrder.fromJson(Map<String, dynamic> json) => $SaleOrderFromJson(json);

  Map<String, dynamic> toJson() => $SaleOrderToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
